<script language="javascript">
    $(document).ready(function() {
        $('#data_cliente').dataTable( {
            "bJQueryUI": true,
            "sPaginationType": "full_numbers",
            "oLanguage": {
                "sLengthMenu": "Mostrar _MENU_ clientes por pagina",
                "sZeroRecords": "Ningun cliente encontrado :(",
                "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ clientes",
                "sInfoEmpty": "Mostrando 0 a 0 de 0 clientes",
                "sInfoFiltered": "(Filtrando de _MAX_ clientes)"
            }
        } );
    } );
</script>

<article class="module width_full">
    <header><h3>Lista de Usuarios</h3></header>
    <div class="module_content">
        <article class="breadcrumbs_content">
            <a href="<?php echo $this->url(array('action' => 'usuario-add')) ?>">Agregar Usuario</a>
        </article>

        <table cellpadding="0" cellspacing="0" border="0" class="display" id="data_cliente" width="100%">
            <thead>
                <tr>                 
                    <th>Nombres</th>
                    <th>Email</th>
                    <th>Usuario</th>
                    <th>Area</th>
                    <th>Acciones</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($this->users as $user) { ?>
                    <tr>
                        <td><?php echo $user['nombre'].' '.$user['apellidos'] ?></td>
                        <td><?php echo $user['email'] ?></td>
                        <td><?php echo $user['username'] ?></td>
                        <td><?php echo $user['area'] ?></td>
                        <td class="center">
                            <a href="<?php echo $this->url(array('action' => 'usuario-edit', 'id' => $user->id)) ?>">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_edit.png"/>
                            </a>
                            <span>&nbsp;&nbsp;&nbsp;</span>
                            <a onclick="return confirm ('Esta seguro que quiere eliminar el usuario ?')" href="<?php echo $this->url(array('action' => 'usuario-delete', 'id' => $user->id)) ?>">
                                <img src="<?php echo $this->baseUrl() ?>/public/styles/admin/images/icn_trash.png"/>
                            </a>
                        </td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
</article>